<template>
  <div id="app">
     <router-view></router-view>
  </div>
</template>

<script>

// import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  sockets: {
    connecting() {
      console.log('正在连接')
      
    },
    disconnect() {
      console.log("Socket 断开");
    },
    connect_failed() {
        console.log('连接失败')
    },
    connect() {
      console.log('socket connected')
      if( sessionStorage.getItem("userTel")){
        this.$socket.emit("login", {
        loginer: sessionStorage.getItem("userTel"),
        kefu: 0, //不是客服
      });
      }
      
      
    }
  },
  components: {
    
    // HelloWorld
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* text-align: center; */
  color: #2c3e50;
  /* margin-top: 60px; */
}
 /* 导航栏 */
 .nav {
    width: 100%;
    height: 35px;
    background-color: #F5F5F5;
    box-shadow: 0px 0px 2px #756C6C;
    color: #756C6C;
    font-size: 10px;
    cursor: pointer;
    margin-bottom: 19px;
}
.navul li:hover {
    color: #FF4400;
}
.navul li {
    float: left;
    width: 100px;
    height: 30px;
    line-height: 35px;
}
.navul li:nth-child(2){
    width: 190px;
}
.navultow li {
    position: relative;
    float: left;
    width: 130px;
    height: 30px;
    line-height: 35px;
}
.hen {
    width: 1px;
    height: 10px;
    background-color: rgb(0, 0, 0, 0.2);
    position: absolute;
    top: 11px;
    right: 24px;
    transform: rotate(20deg);
}
.second {
    width: 100px;
    height: 70px;
    box-shadow: 0px 0px 2px #2999;
    display: none;
    background-color: papayawhip;
}
.mycb1:hover .second {
    display: block;
}
.myxb:hover {
    text-decoration: underline;
    color: red;
    text-decoration: none;
}
.second1:hover {
    color: #FF4400;
    text-decoration: underline;
    text-decoration: none;
}
/* 搜索框 */
.headlogo{
        width: 100%;
    }
    .headinner{
        width: 1170px;
        margin: 0 auto;
    }
    .titlebox{
        display: flex;
        width: 100%;
        margin-left: 105px;
    }
    .miaosu{
        line-height: 68px;
        margin-left: 28px; 
        color: #333;
        font-size: 13 px;
    }
    .miaosu2{
        margin-top: 15px;
        margin-left: 130px;
        border: 2px solid  rgb(246,237,108);
        height: 36px;
        border-radius: 6px;
    }
    .input1{
        height: 37px;
        width: 30px;
    }
    .miaosutext{
        width: 370px;
        border: none;
        height: 32px;
    }
    .titlebox img{
        width: 57px;
        margin-top: 5px;
        border-radius: 50%;

    }
    .miaosubutton{
        border: none;
        background-color: rgb(246,237,108);
        border-radius: 3px;
    }
</style>